﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<PagedList<WorkTimePrj.Item>>" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>工单管理</title>
     <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <link href="<%: Url.Content("~/Content/css/Basic.css") %>" rel="stylesheet" type="text/css" />
    <link href="<%: Url.Content("~/Content/css/usecss.css") %>" rel="stylesheet" type="text/css" />
    <link href="<%: Url.Content("~/Content/css/mgmt.css") %>" rel="stylesheet" type="text/css" />
</head>
<body>
    <%using (Html.BeginForm()){ %>
    <div id="layout" class="layout">
        <div style="margin: 20px;">
            <button type="button" onclick="window.location.href='<%=Url.Action("Create")%>'" class="Button01"
                style="line-height: 24px; height: 24px; margin-top: 2px;">
                <span tag="translate" style="margin: 0px; padding: 0px;">新建工单</span></button>
        </div>
        <div style="margin: 10px;"><h2>工单列表</h2></div>
        <div class="settings" style="padding:10px;">
        <table class="list" cellspacing="0" border="1" style="border-collapse: collapse; border-color: #d1d1d1;">
            <tbody>
                <tr class="listtitle tableline">
                <th width="100px" tag="translate" style="font-size: 15px; font-weight: bold; color: #5ba633;">
                    所属项目
                </th>
                <th width="100px" tag="translate" style="font-size: 15px; font-weight: bold; color: #5ba633;">
                    姓名
                </th>
                <th width="100px" tag="translate" style="font-size: 15px; font-weight: bold; color: #5ba633;">
                    工作时长
                </th>
                <th width="100px" tag="translate" style="font-size: 15px; font-weight: bold; color: #5ba633;">
                    提交时间
                </th>
                <th width="100px" tag="translate" style="font-size: 15px; font-weight: bold; color: #5ba633;">
                    开始时间
                </th>
                <th width="100px" tag="translate" style="font-size: 15px; font-weight: bold; color: #5ba633;">
                    标题
                </th>
                <th width="200px" tag="translate" style="font-size: 15px; font-weight: bold; color: #5ba633;">
                    操作
                </th>
            </tr>
    
            <% foreach (var item in Model) { %>
                <tr class="listcontent tableline">
                    <td>
                        <%:MVCHelpers.Eval(item.Project.code)%>
                    </td>
                    <td>
                        <%:MVCHelpers.Eval(item.account)%>
                    </td>
                    <td>
                        <%:MVCHelpers.Eval(item.cost)%>
                    </td>
                    <td>
                        <%:MVCHelpers.Eval(item.submittime, "yyyy-MM-dd", "")%>
                    </td>
                    <td>
                        <%:MVCHelpers.Eval(item.starttime, "yyyy-MM-dd", "")%>
                    </td>
                    <td>
                        <%:MVCHelpers.Eval(item.title)%>
                    </td>
                    <td>
                        <button type="button" onclick="window.location.href='<%=Url.Action("Edit", new { id = item.uid })%>'" class="Button01" style="line-height: 24px; height: 24px; margin-top: 2px;">
                            <span tag="translate" style="margin: 0px; padding: 0px;">编辑</span>
                        </button>
                        <button type="button" onclick="window.location.href='<%=Url.Action("Details", new { id = item.uid })%>'" class="Button01" style="line-height: 24px; height: 24px; margin-top: 2px;">
                            <span tag="translate" style="margin: 0px; padding: 0px;">详细信息</span>
                        </button>
                        <button type="button" onclick="if(confirm('确认要删除吗？')){window.location.href='<%=Url.Action("Delete", new { id = item.uid })%>';}" class="Button01" style="line-height: 24px; height: 24px; margin-top: 2px;">
                            <span tag="translate" style="margin: 0px; padding: 0px;">删除</span>
                        </button>
                    </td>
                </tr>
            <% } %>
            </tbody>
        </table>
        </div>
    </div>
    <%} %>
    <%@ Import Namespace="Webdiyer.WebControls.Mvc"%>
    <div style="margin: 20px;">
    <%=Html.Pager<WorkTimePrj.Item>(Model, new Webdiyer.WebControls.Mvc.PagerOptions { PageIndexParameterName = "id" })%>
    </div>
</body>
</html>
